<div class="panel panel-primary">
	<!-- Default panel contents -->
	<div class="panel-heading"><?php echo($updateUsername); ?> Profile</div>
	<div class="panel-body">
		<?php
			if(isset($updateProfileFailed) && $updateProfileFailed===true)
			{
				echo renderAlertControl('danger','Profile Update Failed','Profile update has failed, please try again');
			}
			else if(isset($updateProfileFailed) && $updateProfileFailed===false)
			{
				echo renderAlertControl('success','Profile Updated','Profile updated successfully');
			}
		?>
		<form method="POST" role="form" action="profile.php" id="signup-form" name="signup" enctype="multipart/form-data">		
			<input type="hidden" name="txtUserID" class="span4 form-control input-sm" id="txtUserID" placeholder="Name" maxlength="45" value="<?php if(isset($updateUserID) && !empty($updateUserID)){echo $updateUserID;} ?>"/>
			<input type="hidden" name="txtUsername" class="span4 form-control input-sm" id="txtUsername" placeholder="Name" maxlength="45" value="<?php if(isset($updateUsername) && !empty($updateUsername)){echo $updateUsername;} ?>"/>
			<div>
				<div class="form-group">
					<label for="txtFirstName">First Name</label> 
					<div class="input-group input-group-sm">
						<span class="input-group-addon">
							<i class="glyphicon glyphicon-user"></i>
						</span>	
						<input type="text" class="form-control input-sm span4" name="txtFirstName" id="txtFirstName" placeholder="First Name" value="<?php if(isset($updateFirstName) && !empty($updateFirstName)){echo $updateFirstName;} ?>" />
					</div>
				</div>
			</div>
			
			<div>
				<div class="form-group">
					<label for="txtLastName">Last Name</label>
					<div class="input-group input-group-sm">
						<span class="input-group-addon">
							<i class="glyphicon glyphicon-user"></i>
						</span>	
						<input type="text" class="form-control input-sm span4" name="txtLastName" id="txtLastName" placeholder="Last Name" value="<?php if(isset($updateLastName) && !empty($updateLastName)){echo $updateLastName;} ?>" />
					</div>
				</div>
			</div>
			
			<div>
				<div class="form-group">
					<label>Gender</label>
					<div class="radio">
						<label>
							<input type="radio" name="sex" id="rbtnMale" value="M" <?php if(isset($updateGender) && !empty($updateGender) && strcasecmp($updateGender,'M')==0){echo 'checked';} ?>>Male 
						</label>
					</div>
					<div class="radio">
						<label>
							<input type="radio" name="sex" id="rbtnFemale" value="F" <?php if(isset($updateGender) && !empty($updateGender) && strcasecmp($updateGender,'F')==0){echo 'checked';} ?>>Female
						</label>
					</div>
				</div>
			</div>
			
			<div>
				<div class="form-group">
					<label for="txtEmail">Email Address</label>
					<div class="input-group input-group-sm">
						<span class="input-group-addon">
							<i class="glyphicon glyphicon-envelope"></i>
						</span>	
						<input type="email" class="form-control input-sm span4" name="txtEmailAddress" id="txtEmailAddress" placeholder="Email Address" value="<?php if(isset($updateEmailAddress) && !empty($updateEmailAddress)){echo $updateEmailAddress;} ?>" /> 
					</div>
				</div>
			</div>
			
			<hr size="1" class="post-body-seperator" style="color:#e2e1ea">
			
			<input type="hidden" name="txtMailingAddressID" class="span4 form-control input-sm" id="txtMailingAddressID" placeholder="Name" maxlength="45" value="<?php if(isset($updateMailingAddressID) && !empty($updateMailingAddressID)){echo $updateMailingAddressID;} ?>"/>
			<div>
				<div class="form-group">
					<label for="txtStreet1">Street Address</label>
					<div class="input-group input-group-sm">
						<span class="input-group-addon">
							<i class="glyphicon glyphicon-road"></i>
						</span>	
						<input type="text" name="txtStreet1" id="txtStreet1" class="form-control input-sm span4" value="<?php if(isset($updateStreet1) && !empty($updateStreet1)){echo $updateStreet1;} ?>" />
					</div>
				</div>
			</div>
			
			<div>
				<div class="form-group">
					<label for="txtStreet2">Address 2</label>
					<div class="input-group input-group-sm">
						<span class="input-group-addon">
							<i class="glyphicon glyphicon-road"></i>
						</span>	
						<input type="text" name="txtStreet2" id="txtStreet2" class="form-control input-sm span4" value="<?php if(isset($updateStreet2) && !empty($updateStreet2)){echo $updateStreet2;} ?>"/>
					</div>
				</div>
			</div>
			
			<div>
				<div class="form-group">
					<label for="txtCity">City</label>
					<div class="input-group input-group-sm">
						<span class="input-group-addon">
							<i class="glyphicon glyphicon-globe"></i>
						</span>	
						<input type="text" name="txtCity" id="txtCity" class="form-control input-sm span4" value="<?php if(isset($updateCity) && !empty($updateCity)){echo $updateCity;} ?>" />
					</div>
				</div>
			</div>
			
			<div>
				<div class="form-group">
					<label for="ddlCountry">Country</label>
					<div class="input-group input-group-sm">
						<span class="input-group-addon">
							<i class="glyphicon glyphicon-globe"></i>
						</span>	
						<select class="form-control input-sm  span4" id="ddlCountry" name="ddlCountry">
							<?php 
								renderAllCountryOptions("JAM",$updateCountry);
							?>
						</select>
					</div>
				</div>
			</div>

			<hr size="1" class="post-body-seperator" style="color:#e2e1ea">
			
			<input type="hidden" name="txtHomeContactID" class="span4 form-control input-sm" id="txtHomeContactID" placeholder="Name" maxlength="45" value="<?php if(isset($updateHomeContactID) && !empty($updateHomeContactID)){echo $updateHomeContactID;} ?>"/>
			<div>
				<div class="form-group">
					<label>Home Phone</label>
					<div class="input-group input-group-sm">
						<span class="input-group-addon">
							<i class="glyphicon glyphicon-phone-alt"></i>
						</span>	
						<input type="text" class="form-control input-sm span4" name="txtHomeNumber" id ="txtHomeNumber" maxlength="10" placeholder="Number"  value="<?php if(isset($updateHomeContactNumber) && !empty($updateHomeContactNumber)){echo $updateHomeContactNumber;} ?>" />
					</div>
				</div>
			</div>

			<input type="hidden" name="txtMobileContactID" class="span4 form-control input-sm" id="txtMobileContactID" placeholder="Name" maxlength="45" value="<?php if(isset($updateMobileContactID) && !empty($updateMobileContactID)){echo $updateMobileContactID;} ?>"/>
			<div>
				<div class="form-group">
					<label>Mobile Phone</label>
					<div class="input-group input-group-sm">
						<span class="input-group-addon">
							<i class="glyphicon glyphicon-phone"></i>
						</span>	
						<input type="text" class="form-control input-sm span4" name="txtMobileNumber" id ="txtMobileNumber" maxlength="10" placeholder="Number"  value="<?php if(isset($updateMobileContactNumber) && !empty($updateMobileContactNumber)){echo $updateMobileContactNumber;} ?>"/>
					</div>
				</div>
			</div>
			
			<div>
				<div class="form-group">					
					<label for="txtAboutme">About Me</label>
					<div class="input-group">
						<span class="input-group-addon">
							<i class="glyphicon glyphicon-user"></i>
						</span>
						<textarea rows="10" cols="75" class="form-control input-sm span6" name="txtAboutme" id="txtAboutme" size="300" placeholder="Tell TicToc Watches about yourself..."><?php if(isset($updateAboutMe) && !empty($updateAboutMe)){echo $updateAboutMe;} ?></textarea>
					</div>
				</div>
			</div>
			
			<hr size="1" class="post-body-seperator" style="color:#e2e1ea">
			
			<div class="standard-profile-img-container">
				<img class="standard-profile-img" src="img/profile/<?php if(isset($newFileName) && !empty($newFileName)){echo($newFileName);}else{ if(isset($updateGender) && strtolower($updateGender)=='f'){echo('default-female.png'); }else{echo('default-male.png');}}   ?>"/>
			</div>
			
			<div>
				<div class="form-group">
					<label for="fileProfileImg">Upload a Profile Image</label>
					<div class="input-group input-group-sm">
						<span class="input-group-addon">
							<i class="glyphicon glyphicon-camera"></i>
						</span>	
						<input type="file" name="fileProfileImg" class="span4 form-control input-sm" id="fileProfileImg" placeholder="" maxlength="" />
						
					</div>
					<label for="fileProfileImg" class="error"><?php if(isset($profileImgUploadSuccess) && !$profileImgUploadSuccess){echo("File upload failed");} ?></label>
				</div>
			</div>
			
			<div class="form-group">
				<div>
					<label for="btnUpdateProfile" class="btn btn-primary "><i class="glyphicon glyphicon-floppy-disk"></i> Save</label>
					<input type="submit" class="btn btn-primary hidden" id="btnUpdateProfile" name="btnUpdateProfile" value="Save">
				</div>
			</div>
		</form>
	</div>
</div>